S[N_,x_,t_]:=(∑_(i=1)^N)((8/((((2i-1))^3)π))Exp[-(((2i-1))^2)t]Sin[(2i-1)x]);

Animate[Plot[{x(π-x),S[50,x,t]}, {x, 0, π}, AspectRatio->1, PlotRange->{{0,π},{0,3}},Ticks->{{0,π}, {1, 2, 3}}], {t, 0,6,0.25}]

Manipulate[Plot[{x(π-x),(∑_(i=1)^N)((8/((((2i-1))^3)π))Exp[-(((2i-1))^2)t]Sin[(2i-1)x])},{x,0,π}],{N,1,50,1},{t,0,5,1}]